<%@page import="com.team.util.DateCount"%>
<%@page import="com.team.entity.Record"%>
<%@page import="com.team.entity.Project"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.team.entity.Contact"  %>
<%@ page import="com.team.util.Const"  %>
<%@ page import="com.team.entity.User" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>联系人</title>
	<link rel="stylesheet" href="css/prettify.css" />
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <script type="text/javascript" src="js/jquery.js"></script>
</head>
<body class="body">

<% 
	User user = (User)session.getAttribute(Const.SESSION_USER); 
	Project project =(Project)session.getAttribute(Const.SESSION_PROJ);
 %>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a href="#" class="brand">凯盛项目管理系统</a>
				 <ul class="nav pull-right">
						<li><a class="nav pull-right" href="#">用户名： <%=user.getUsername() %></a></li>
				 </ul>
			</div>
		</div>
	</div>
	<div class="container">
		<div class="row">
				<div class="span3">
						<div class="well" style="padding: 8px 0;">
							<ul class="nav nav-list">
							  <li class="nav-header"><%=project.getProjName() %></li>
							  <li class="divider"></li>
							  <li ><a href="info.jspx?_m=select&projId=<%=project.getId() %>"><i class="icon-home"></i>最新动态</a></li>
							  <li><a href="addGoal.jspx?_m=select"><i class="icon-flag"></i>目标</a></li>
							  <li><a href="docShare.jspx?_m=select&projId=<%=project.getId() %>"><i class="icon-folder-open"></i>资料库</a></li>
							  <li><a href="newFolder.jspx?_m=select"><i class="icon-file"></i>文件共享</a></li>
							  <li  class="active"><a href="newContact.jspx?_m=select&projId=<%=project.getId() %>"><i class="icon-white icon-user"></i>联系人</a></li>
							  <li><a href="newIdea.jspx?_m=select&id=<%=project.getId() %>"><i class="icon-fire"></i>想法</a></li>
							  <li><a href="findBug.jsp"><i class="icon-warning-sign"></i>Bug</a></li>
							  <li><a href="projReset.jsp"><i class="icon-cog"></i>项目设置</a></li>
							</ul>
						</div>
				</div>
									
								
			<div class="span9">
			
			<ul style="margin-bottom:0px;border-radius: 3px 3px 0 0" class="breadcrumb">
				<li class="active">
					<a href="task.html"><i class="icon-user"></i>联系人</a>
				</li>
			</ul>
			<div class="wall">
				<div class="row">
				<div class="span3">
							<a href="newContact.jsp" class="btn span2"><i class="icon-plus"></i>添加联系人</a><br/>
							
							<div class="clear"></div>
							<ul class="unstyled" style="margin-top:15px">
						<%
							List<Contact> list  = (List<Contact>)session.getAttribute(Const.SESSION_CONTACT);
							if(list == null){
						 %>
							 <div style="color:red"> 还没有任何联系人 </div>
						 <%}else{
							for(Contact con : list){
						 %>
							<li style="line-height:30px">
								<i class="icon-list-alt"></i><a href="newContact.jspx?_m=find&contactId=<%=con.getId() %>"><%=con.getContactName() %></a>
							</li>
							<%}} %>
						</ul>
				</div>
				
				
					<div style="min-height:400px;border-left:1px solid #ccc;padding-left:15px" class="span5">
						<%
						Contact ct = (Contact)session.getAttribute(Const.SESSION_CONTACT_RECORED);
						if(ct == null ){
						 %>
						 <div style="color:red;">没有记录</div>
						 <%}else { %>
						<address>
						<%=ct.getId() %>
							<h3>姓名：<%=ct.getContactName() %> </h3>
							<p>公司：</p>
							<small>手机：<%=ct.getMobelNum() %></small><br/>
							<small>固话：<%=ct.getTelNum() %></small><br/><br/>
							<small>邮箱：<%=ct.getEmail() %></small><br/>
							<small>地址：<%=ct.getAddress() %></small><br/><br/>
							<small>主页：</small> <a href="<%=ct.getWebSate() %>"><%=ct.getWebSate() %></a><br/>
							<small>微博：</small> <a href="<%=ct.getWeiBo() %>"><%=ct.getWeiBo() %></a><br/>
						</address>
						
						
						
						<div class="line"><h3>记录</h3></div>
						
						<blockquote>
						  <small>发布于 前</small>
						</blockquote>
						
						<a href="record.jspx?_m=select&conId=<%=ct.getId() %>">查看所有记录</a>
					
						<br/><br/><br/>
						<a href="newContact.jspx?_m=edit&conId=<%=ct.getId() %>" class="btn btn-primary"><i class="icon-pencil icon-white"></i>编辑联系人</a>
						<a class="btn " ><i class="icon-trash icon-white"></i>删除联系人</a>
						<%} %>
					</div>
				</div>
			</div>
			
			
			
		</div>
			</div>
		
	</div>
	
</body>
</html>